﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UCEvento.ascx.cs" Inherits="CondorTravelOperacionesWeb.Pages.Controles.UCEvento" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register src="../../Controls/UCMessageForm.ascx" tagname="UCMessageForm" tagprefix="uc1" %>

<style type="text/css">
    .style1
    {
        width: 148px;
    }
    .style2
    {
        width: 45px;
    }
    .style3
    {
        width: 157px;
    }
</style>

<script type="text/javascript">
    var formato = 1;      
            
</script>     
<asp:Label ID="lblMensaje" runat="server"></asp:Label>

<uc1:UCMessageForm ID="UCMessageForm2" runat="server" />
<br />
<%// Add new user FFUser %><asp:Panel ID="pnlForm" runat="server">

<table  class="advancedfilter" border="0" width="504px">
    <tr style="height:15px;">
        <td></td>
        <td  colspan="5">
            <asp:ValidationSummary ID="vsEVento" runat="server" ValidationGroup="evento" />
        </td>
            
    </tr>
    <tr style="height:15px;">
        <td></td>
        <td class="cellfield">Código de Evento:</td>
        <td class="style1"> 
            <asp:TextBox ID="txtCodigoEvento" runat="server" CssClass="cssTextBox"  Enabled="false"
                maxlength="15" Width="80px" ValidationGroup="evento" >0</asp:TextBox>
        </td>
        <td  class="cellhidden"></td>
        <td class="style2">&nbsp;</td>
        <td class="style3"> 
            &nbsp;</td>
    </tr>
<tr style="height:15px;">
    <td  class="cellhidden" ></td>
    <td class="cellfield">Fecha evento</td>   
    <td class="style1">
        <asp:TextBox ID="txtFechaEvento" runat="server" CssClass="cssTextBox" 
            maxlength="50" EnableViewState="false" Width="80px" TabIndex="1" 
            ValidationGroup="evento" ></asp:TextBox>
                            <asp:Image ID="imgFechaInicio" runat="server" ImageUrl="~/Images/calendar1.png" Width="20px"/>
                <asp:CalendarExtender  runat="server" ID="calextender"
                                        TargetControlID="txtFechaEvento"
                                        Format="dd/MM/yyyy"
                                        PopupButtonID="imgFechaInicio"/>
                &nbsp;<asp:RequiredFieldValidator ID="rfvFechaEvento" runat="server" 
            ControlToValidate="txtFechaEvento" 
            ErrorMessage="El campo [Fecha de evento] es obligatorio" 
            ValidationGroup="evento">*</asp:RequiredFieldValidator><asp:CompareValidator 
            ID="cpvFecinicio" runat="server" 
                    ControlToValidate="txtFechaEvento" 
                    ErrorMessage="El campo [Fecha de evento] debe ser una fecha valida" 
                    Operator="DataTypeCheck" Type="Date" ValidationGroup="evento">*</asp:CompareValidator></td>
    <td>&nbsp;</td>
    <td class="style2">Hora:</td>    
    <td class="style3"> 
    <div id="divhora">
      
       <div>
        <asp:TextBox ID="txtHoraEvento" runat="server"  CssClass="cssTextBox" 
               maxlength="50" EnableViewState="false" Width="80px" 
               ValidationGroup="evento" ></asp:TextBox>            
           &nbsp;<asp:RequiredFieldValidator ID="rfvHora" runat="server" 
               ControlToValidate="txtHoraEvento" 
               ErrorMessage="El campo [hora] es obligatorio" ValidationGroup="evento">*</asp:RequiredFieldValidator><asp:RegularExpressionValidator ID="RegularExpressionValidator1" 
               runat="server" ControlToValidate="txtHoraEvento" 
               ErrorMessage="El campo [Hora] debe contener una hora valida (AM o PM)" 
               
               ValidationExpression="^((([0]?[1-9]|1[0-2])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])?( )?(AM|am|aM|Am|PM|pm|pM|Pm))|(([0]?[0-9]|1[0-9]|2[0-3])(:|\.)[0-5][0-9]((:|\.)[0-5][0-9])?))$" 
               ValidationGroup="evento">*</asp:RegularExpressionValidator></div>
         <script language="javascript" type="text/javascript">             
             $('#divhora input').ptTimeSelect();
       </script>
    </div>
    </td>
</tr>
<tr style="height:15px;">
    <td></td>
    <td  class="cellfield">Agencia:</td>
    <td colspan="4">
        <asp:DropDownList ID="cboAgencia" runat="server" Width="354px" 
            ValidationGroup="evento">
        </asp:DropDownList>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
            ErrorMessage="El campo [Agencia] es obligatorio" 
            ControlToValidate="cboAgencia" InitialValue="0" ValidationGroup="evento">*</asp:RequiredFieldValidator>
    </td>

</tr>
<tr style="height:15px;">
    <td></td>
    <td  class="cellfield">Agente:</td>
    <td colspan="4">
        <asp:DropDownList ID="cboAgente" runat="server" Width="354px" 
            ValidationGroup="evento">
        </asp:DropDownList><asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
            ErrorMessage="El campo [Agente] es obligatorio" 
            ControlToValidate="cboAgente" InitialValue="0" ValidationGroup="evento">*</asp:RequiredFieldValidator>
            </td>
</tr>
<tr style="height:15px;">
   <td></td>
    <td  class="cellfield">Itinerario:</td>
    <td colspan="4">
        <asp:TextBox ID="txtItinerario" runat="server" Width="350px" 
            BackColor="#CCCCCC" Enabled="False"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
            ControlToValidate="txtItinerario" 
            ErrorMessage="El campo [Itinerario] es obligatorio" ValidationGroup="evento">*</asp:RequiredFieldValidator>
            </td>
</tr>
<tr style="height:15px;">
    <td></td>
    <td  class="cellfield">Programación:</td>
    <td colspan="4">
        <asp:TextBox ID="txtProgramacion" runat="server" Enabled=false 
            CssClass="cssTextBox" Width="350px" BackColor="#CCCCCC" ></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
            ControlToValidate="txtProgramacion" 
            ErrorMessage="El campo [Programacion] es obligatorio" ValidationGroup="evento">*</asp:RequiredFieldValidator>
    </td>
</tr>
<tr style="height:15px;">      
    <td></td>
    <td  class="cellfield">Observación:</td>    
    <td colspan="4">
        <asp:TextBox ID="txtObservacion" runat="server" Height="105px" 
            TextMode="MultiLine" Width="350px"></asp:TextBox>
    </td>
</tr>
<tr>
<td></td>
   <td  class="cellfield">Estado:</td>    
    <td colspan="4">
        <asp:DropDownList ID="cboEstado" runat="server" Width="354px" 
            ValidationGroup="evento">
        </asp:DropDownList>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
            ControlToValidate="cboEstado" ErrorMessage="El campo [Estado] es obligatorio" 
            InitialValue="0" ValidationGroup="evento">*</asp:RequiredFieldValidator>
    </td>
</tr>
<tr>
<td></td>
<td class="cellfield">&nbsp;</td>
<td colspan="4">
    <asp:HiddenField ID="hfCodigoProgramacion" runat="server" />
    </td>
</tr>
<tr>
<td></td>
  <td colspan=5 align=right>        
      <asp:Button ID="btnSearch" runat="server" onclick="btnSearch_Click"  
            Text="Guardar" TabIndex="2" ValidationGroup="evento" />&nbsp;&nbsp;
  </td>    
</tr>
</table>
</asp:Panel>

<asp:Panel ID="pnlForm1" runat="server" Visible="false">
    
</asp:Panel>

